package cn.yunhe.biz;

import java.util.HashMap;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;

import cn.yunhe.dao.IAdminDao;
import cn.yunhe.model.Admin;
import cn.yunhe.util.SqlSessionFactoryUtil;

public class AdminBiz {

	public Admin adminLogin(String name, String pwd) {
		SqlSession session = SqlSessionFactoryUtil.getSession();

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("adminName", "admin");
		map.put("adminPass", "admin");
		// Admin admin=session.selectOne("adminLogin", map);
		IAdminDao adminDao = session.getMapper(IAdminDao.class);
		Admin admin = adminDao.adminLogin(map);

		return admin;

	}

}
